package com.simulacra.model;

import com.simulacra.util.Utilities;
/**
 * Clase que contiene los atributod de Un {@link com.simulacra.model.Team}
 * implementa las operaciones de la interfaz {@link com.simulacra.model.Team}
 *
 */
public class SoccerTeam implements Team {
    int currentScore= 0;
    int momentum= 0;
    int generalRank = 0;
    private String name= null;
    public SoccerTeam (int value) {
    	this("", value);
    }    

    public SoccerTeam (String name, int value) {
    	generalRank= value;
    	setName (name);
    }    
    public SoccerTeam (String name, String value) {
    	this (name, Utilities.getInt(value));

    }

    public void addGoal() {
		// TODO Auto-generated method stub
		currentScore ++;
	}

	public void addMomentum() {
		// TODO Auto-generated method stub
		momentum ++;

	}

	public int getScoredGoal() {
		// TODO Auto-generated method stub
		return currentScore;
	}

	public void setMomentum(int value) {
		// TODO Auto-generated method stub
		momentum= value;

	}

	public void setScoredGoal(int value) {
		// TODO Auto-generated method stub
		currentScore= value;

	}
	public int getGeneralRank() {
		return generalRank;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public Double getRank() {
		// TODO Auto-generated method stub
		return new Double((double)getGeneralRank()/100);
	}

}
